import { request,uploadFile } from "@/utils/request";
import { PageParams } from "@/types/global";


//获取充值列表
export const getRechargeList = (data: PageParams) =>
  request<any>({
    method: "POST",
    url: "/recharge/page/list",
    data
  })


//添加充值
export const addRegister = (data:any) =>
  uploadFile<any>({
    url: "/recharge/add",
    filePath: data.filePath,
    formData:{
      amount:data.amount,
      payType:data.payType
    },
    name: 'file'
  })

  //获取支付方式
export const getPayTypeList = () =>
  request<any>({
    method: "GET",
    url: "/common/pay/type"
  })
